<template>
  <ul class='detail first-box' v-if="listData.length">
    <li v-for="item in listData">
      <p class="title">{{item.title}}</p>
      <p class="date color999">{{item.date}}</p>
      <p class="content">{{item.content}}</p>
    </li>
  </ul>
  <p class="no-data" v-else>暂时没有数据</p>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      listData:[
        
      ],
    };
  },
  methods: {
    getList(){
      var params={
        userId:sessionStorage.getItem("userId"),
        type:_g.getRouterParams(this).type
      }
      _g.apiPost("vipInfo/getMsg.do",params).then(res=>{
        var goal=[]
        res.data.list.forEach(ele => {
            goal.push({
              title:res.name||"暂时无标题",
              date:ele.pushTime||"暂无",
              content:ele.message||"暂无"
            })
        });
        this.$set(this,"listData",goal)
      })
    }
  },
  created() {
    this.getList()
  }
};
</script>
<style lang="scss" scoped>
.detail {
  background-color: #f2f2f2;
  font-size: 14px;
  color:#333;
  padding: 10px;
  li{
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 0px 5px 1px #ccc;
    margin-bottom: 10px;
  }
  .title{
    font-size: 16px;
  }
  .date{
    font-size: 12px;
    line-height: 25px;
  }
  .content{
    color:#666;
  }
}
</style>